package com.acme.chat.newclient;

import java.io.Serializable;

import com.acme.chat.message.MessageType;

public class ClientMessage implements Serializable {
    private MessageType type;
    private String message;
    private String serverName;
    private int port;
    private String room;
    private String nameToWho;

    public ClientMessage(MessageType type, String message) {
        this.type = type;
        this.message = message;
    }

    public ClientMessage(MessageType messageType) {
        this(messageType, null);
    }

    public MessageType getType() {
        return type;
    }

    public String getMessage() {
        return message;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }

    public String getServerName() {
        return serverName;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getPort() {
        return this.port;
    }

    public void setRoom(String room) {
        this.room = room;
    }

    public String getRoom() {
        return room;
    }

    public void setNameToWho(String name) {
        this.nameToWho = name;
    }

    public String getNameToWho() {
        return nameToWho;
    }

}
